import request from '@/utils/request'

//将店家添加到收藏表中
export function addToCollectShop(data) {
    return request({
        url: `/api/collectShop/add`,
        //post请求
        method: 'post',
        data
    })
}

//将店家移除收藏表
export function deleteFromCollectShop(data) {
    return request({
        url: `/api/collectShop/delete/${data.userId}/${data.merchantId}`,
        //post请求
        method: 'post',
        data
    })
}

//收藏菜品
export function addToCollectDish(data) {
    return request({
        url: `/api/collectDish/add`,
        //post请求
        method: 'post',
        data
    })
}

//查询是否收藏店家
export function queryCollect(data) {
    return request({
        url: `/api/collectShop/query/${data.userId}/${data.merchantId}`,
        //post请求
        method: 'post',
        data
    })
}

export function getAllDish(data) {
    return request({
        url: `/api/collectDish/all/${data.id}`,
        //post请求
        method: 'post',
        data
    })
}
export function deleteDish(data) {
    return request({
        url: `/api/collectDish/delete/${data.id}`,
        //post请求
        method: 'post',
        data
    })
}

export function getAllShop(data) {
    return request({
        url: `/api/collectShop/all/${data.id}`,
        //post请求
        method: 'post',
        data
    })
}
export function deleteShop(data) {
    return request({
        url: `/api/collectShop/delete`,
        //post请求
        method: 'post',
        data
    })
}
